<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<canvas id="canvas" style="border: 1px solid red;"></canvas>
		<script type="text/javascript">
			var canvas = document.getElementById('canvas')
			var cxt = canvas.getContext('2d')
			canvas.width = 400
			canvas.height = 300
			for (var i = 0; i < 6; i++) {
				for (var j = 0; j < 6; j++) {
					cxt.strokeStyle = "rgb("+Math.floor(255 - i*42.5)+","+Math.floor(255 -j*42.5)+", "+0+")"
					cxt.beginPath()
					cxt.arc(20+j*25, 20+i*25,10,0,2*Math.PI,true)
					cxt.stroke()
					cxt.closePath()
				}
			}
		</script>
	</body>
</html>
